package com.neu.dao.wty;

import com.neu.dao.BaseDao;
import com.neu.util.DBUtils;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.MapListHandler;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public class MgrDao extends BaseDao {
    public List<Map<String,Object>> checkLogin (String m_no,String m_pwd){
        List<Map<String,Object>> list=null;
        QueryRunner qr=new QueryRunner(DBUtils.getDataSource()) ;
        String sql="select * from t_mgr where 1=1" +
                   " and m_no=?" +
                   " and m_pwd=?";

        try {
            list=qr.query(sql,new MapListHandler(),m_no,m_pwd);
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return list;
    }
}
